﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once

#include "GcmpDatabase.h"
#include "NdbPropertySchemaType.h"

namespace gcmp
{
    class ClassId;

    /// \brief ClassId相关辅助接口
    class GCMP_DATABASE_EXPORT NdbClassIdUtils
    {
    public:
        /// \brief  通过目标属性类型枚举值获取对应的ClassId
        ///
        /// \see ClassId  和 \see NdbPropertySchemaType
        /// a) 同一枚举值对应的ClassId固定不变，若能成功识别枚举值则返回正常ClassId，
        ///    否则返回的Id为无效的，可通过 ::ClassId::IsValid() 判断。
        /// b) 通过该方式获取的ClassId是Class Version不会改变， 一直为1
        ///
        /// \param  propertySchemaType 需要转换的目标类型枚举值
        /// \return ClassId  与枚举值对应的ClassId
         static ClassId GetClassIdOfPropertySchemaType(NdbPropertySchemaType propertySchemaType);

         /// \brief Value的ClassId
         static ClassId Value;

         /// \brief ElementId的ClassId
         static ClassId ElementId;

         /// \brief SchematicObject的ClassId
         static ClassId SchematicObject;

         /// \brief CloneableObject的ClassId
         static ClassId CloneableObject;

         /// \brief IDbObject的ClassId
         static ClassId IDbObject;

         /// \brief OwnerPtrToNdbObject的ClassId
         static ClassId OwnerPtrToNdbObject;

         /// \brief OwnerPtrToIDbObject的ClassId
         static ClassId OwnerPtrToIDbObject;

         /// \brief NativePointer的ClassId
         static ClassId NativePointer;

         /// \brief WString的ClassId
         static ClassId WString;

         /// \brief Vector的ClassId
         static ClassId Vector;

         /// \brief Set的ClassId
         static ClassId Set;

         /// \brief Map的ClassId
         static ClassId Map;

         /// \brief UnorderedMap的ClassId
         static ClassId UnorderedMap;
    };
}
